#include "DetourCrowd.h"
#ifdef __cplusplus
extern "C" {
#endif
int nav_dtCrowd_addAgent(dtCrowd * c_this,float const * pos,dtCrowdAgentParams const * params){
	float const * c_arg_pos=(float const *)(void*)(pos);
	dtCrowdAgentParams const * c_arg_params=(dtCrowdAgentParams const *)(void*)(params);
	int c_out = c_this->addAgent(c_arg_pos,c_arg_params);
	int wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtCrowd_Delete(dtCrowd * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtCrowd_DeleteArray(dtCrowd * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtCrowd * nav_NewdtCrowd(){
	dtCrowd* wrap_out = new dtCrowd();
	return wrap_out;
}

int nav_dtCrowd_getActiveAgents(dtCrowd * c_this,dtCrowdAgent * * agents,int const maxAgents){
	dtCrowdAgent * * c_arg_agents=(dtCrowdAgent * *)(void*)(agents);
	int const c_arg_maxAgents=maxAgents;
	int c_out = c_this->getActiveAgents(c_arg_agents,c_arg_maxAgents);
	int wrap_out  = (c_out);
	return wrap_out;
}

dtCrowdAgent const * nav_dtCrowd_getAgent(dtCrowd * c_this,int const idx){
	int const c_arg_idx=idx;
	dtCrowdAgent const * c_out = c_this->getAgent(c_arg_idx);
	dtCrowdAgent const * wrap_out  = (dtCrowdAgent const *)(void*)(c_out);
	return wrap_out;
}

int nav_dtCrowd_getAgentCount(dtCrowd const * c_this){
	int c_out = c_this->getAgentCount();
	int wrap_out  = (c_out);
	return wrap_out;
}

dtCrowdAgent * nav_dtCrowd_getEditableAgent(dtCrowd * c_this,int const idx){
	int const c_arg_idx=idx;
	dtCrowdAgent * c_out = c_this->getEditableAgent(c_arg_idx);
	dtCrowdAgent * wrap_out  = (dtCrowdAgent *)(void*)(c_out);
	return wrap_out;
}

dtQueryFilter * nav_dtCrowd_getEditableFilter(dtCrowd * c_this,int const i){
	int const c_arg_i=i;
	dtQueryFilter * c_out = c_this->getEditableFilter(c_arg_i);
	dtQueryFilter * wrap_out  = (dtQueryFilter *)(void*)(c_out);
	return wrap_out;
}

dtQueryFilter const * nav_dtCrowd_getFilter(dtCrowd const * c_this,int const i){
	int const c_arg_i=i;
	dtQueryFilter const * c_out = c_this->getFilter(c_arg_i);
	dtQueryFilter const * wrap_out  = (dtQueryFilter const *)(void*)(c_out);
	return wrap_out;
}

dtProximityGrid const * nav_dtCrowd_getGrid(dtCrowd const * c_this){
	dtProximityGrid const * c_out = c_this->getGrid();
	dtProximityGrid const * wrap_out  = (dtProximityGrid const *)(void*)(c_out);
	return wrap_out;
}

dtNavMeshQuery const * nav_dtCrowd_getNavMeshQuery(dtCrowd const * c_this){
	dtNavMeshQuery const * c_out = c_this->getNavMeshQuery();
	dtNavMeshQuery const * wrap_out  = (dtNavMeshQuery const *)(void*)(c_out);
	return wrap_out;
}

dtObstacleAvoidanceParams const * nav_dtCrowd_getObstacleAvoidanceParams(dtCrowd const * c_this,int const idx){
	int const c_arg_idx=idx;
	dtObstacleAvoidanceParams const * c_out = c_this->getObstacleAvoidanceParams(c_arg_idx);
	dtObstacleAvoidanceParams const * wrap_out  = (dtObstacleAvoidanceParams const *)(void*)(c_out);
	return wrap_out;
}

dtPathQueue const * nav_dtCrowd_getPathQueue(dtCrowd const * c_this){
	dtPathQueue const * c_out = c_this->getPathQueue();
	dtPathQueue const * wrap_out  = (dtPathQueue const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_dtCrowd_getQueryExtents(dtCrowd const * c_this){
	float const * c_out = c_this->getQueryExtents();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

float const * nav_dtCrowd_getQueryHalfExtents(dtCrowd const * c_this){
	float const * c_out = c_this->getQueryHalfExtents();
	float const * wrap_out  = (float const *)(void*)(c_out);
	return wrap_out;
}

int nav_dtCrowd_getVelocitySampleCount(dtCrowd const * c_this){
	int c_out = c_this->getVelocitySampleCount();
	int wrap_out  = (c_out);
	return wrap_out;
}

dtCrowd * nav_dtCrowd_IndexArray(dtCrowd * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

bool nav_dtCrowd_init(dtCrowd * c_this,int const maxAgents,float const maxAgentRadius,dtNavMesh * tmp_arg_nav){
	int const c_arg_maxAgents=maxAgents;
	float const c_arg_maxAgentRadius=maxAgentRadius;
	dtNavMesh * c_arg_tmp_arg_nav=(dtNavMesh *)(void*)(tmp_arg_nav);
	bool c_out = c_this->init(c_arg_maxAgents,c_arg_maxAgentRadius,c_arg_tmp_arg_nav);
	bool wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtCrowd_removeAgent(dtCrowd * c_this,int const idx){
	int const c_arg_idx=idx;
	c_this->removeAgent(c_arg_idx);
}

bool nav_dtCrowd_requestMoveTarget(dtCrowd * c_this,int const idx,dtPolyRef ref,float const * pos){
	int const c_arg_idx=idx;
	dtPolyRef c_arg_ref=ref;
	float const * c_arg_pos=(float const *)(void*)(pos);
	bool c_out = c_this->requestMoveTarget(c_arg_idx,c_arg_ref,c_arg_pos);
	bool wrap_out  = (c_out);
	return wrap_out;
}

bool nav_dtCrowd_requestMoveVelocity(dtCrowd * c_this,int const idx,float const * vel){
	int const c_arg_idx=idx;
	float const * c_arg_vel=(float const *)(void*)(vel);
	bool c_out = c_this->requestMoveVelocity(c_arg_idx,c_arg_vel);
	bool wrap_out  = (c_out);
	return wrap_out;
}

bool nav_dtCrowd_resetMoveTarget(dtCrowd * c_this,int const idx){
	int const c_arg_idx=idx;
	bool c_out = c_this->resetMoveTarget(c_arg_idx);
	bool wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtCrowd_setObstacleAvoidanceParams(dtCrowd * c_this,int const idx,dtObstacleAvoidanceParams const * params){
	int const c_arg_idx=idx;
	dtObstacleAvoidanceParams const * c_arg_params=(dtObstacleAvoidanceParams const *)(void*)(params);
	c_this->setObstacleAvoidanceParams(c_arg_idx,c_arg_params);
}

void nav_dtCrowd_update(dtCrowd * c_this,float const dt,dtCrowdAgentDebugInfo * debug){
	float const c_arg_dt=dt;
	dtCrowdAgentDebugInfo * c_arg_debug=(dtCrowdAgentDebugInfo *)(void*)(debug);
	c_this->update(c_arg_dt,c_arg_debug);
}

void nav_dtCrowd_updateAgentParameters(dtCrowd * c_this,int const idx,dtCrowdAgentParams const * params){
	int const c_arg_idx=idx;
	dtCrowdAgentParams const * c_arg_params=(dtCrowdAgentParams const *)(void*)(params);
	c_this->updateAgentParameters(c_arg_idx,c_arg_params);
}

void nav_dtCrowdAgent_Delete(dtCrowdAgent * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtCrowdAgent_DeleteArray(dtCrowdAgent * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtCrowdAgent * nav_NewdtCrowdAgent(){
	dtCrowdAgent* wrap_out = new dtCrowdAgent();
	return wrap_out;
}

bool * nav_dtCrowdAgent_GetPtrToActive(dtCrowdAgent * c_this){
	return (bool *)(&(c_this->active));
}

dtLocalBoundary * nav_dtCrowdAgent_GetPtrToBoundary(dtCrowdAgent * c_this){
	return (dtLocalBoundary *)(&(c_this->boundary));
}

unsigned char(*nav_dtCrowdAgent_GetPtrToCornerFlags(dtCrowdAgent * c_this))[4]{
	return (unsigned char(*)[4])(&(c_this->cornerFlags));
}

dtPolyRef(*nav_dtCrowdAgent_GetPtrToCornerPolys(dtCrowdAgent * c_this))[4]{
	return (dtPolyRef(*)[4])(&(c_this->cornerPolys));
}

float(*nav_dtCrowdAgent_GetPtrToCornerVerts(dtCrowdAgent * c_this))[12]{
	return (float(*)[12])(&(c_this->cornerVerts));
}

dtPathCorridor * nav_dtCrowdAgent_GetPtrToCorridor(dtCrowdAgent * c_this){
	return (dtPathCorridor *)(&(c_this->corridor));
}

float * nav_dtCrowdAgent_GetPtrToDesiredSpeed(dtCrowdAgent * c_this){
	return (float *)(&(c_this->desiredSpeed));
}

float(*nav_dtCrowdAgent_GetPtrToDisp(dtCrowdAgent * c_this))[3]{
	return (float(*)[3])(&(c_this->disp));
}

float(*nav_dtCrowdAgent_GetPtrToDvel(dtCrowdAgent * c_this))[3]{
	return (float(*)[3])(&(c_this->dvel));
}

int * nav_dtCrowdAgent_GetPtrToNcorners(dtCrowdAgent * c_this){
	return (int *)(&(c_this->ncorners));
}

dtCrowdNeighbour(*nav_dtCrowdAgent_GetPtrToNeis(dtCrowdAgent * c_this))[6]{
	return (dtCrowdNeighbour(*)[6])(&(c_this->neis));
}

int * nav_dtCrowdAgent_GetPtrToNneis(dtCrowdAgent * c_this){
	return (int *)(&(c_this->nneis));
}

float(*nav_dtCrowdAgent_GetPtrToNpos(dtCrowdAgent * c_this))[3]{
	return (float(*)[3])(&(c_this->npos));
}

float(*nav_dtCrowdAgent_GetPtrToNvel(dtCrowdAgent * c_this))[3]{
	return (float(*)[3])(&(c_this->nvel));
}

dtCrowdAgentParams * nav_dtCrowdAgent_GetPtrToParams(dtCrowdAgent * c_this){
	return (dtCrowdAgentParams *)(&(c_this->params));
}

bool * nav_dtCrowdAgent_GetPtrToPartial(dtCrowdAgent * c_this){
	return (bool *)(&(c_this->partial));
}

unsigned char * nav_dtCrowdAgent_GetPtrToState(dtCrowdAgent * c_this){
	return (unsigned char *)(&(c_this->state));
}

dtPathQueueRef * nav_dtCrowdAgent_GetPtrToTargetPathqRef(dtCrowdAgent * c_this){
	return (dtPathQueueRef *)(&(c_this->targetPathqRef));
}

float(*nav_dtCrowdAgent_GetPtrToTargetPos(dtCrowdAgent * c_this))[3]{
	return (float(*)[3])(&(c_this->targetPos));
}

dtPolyRef * nav_dtCrowdAgent_GetPtrToTargetRef(dtCrowdAgent * c_this){
	return (dtPolyRef *)(&(c_this->targetRef));
}

bool * nav_dtCrowdAgent_GetPtrToTargetReplan(dtCrowdAgent * c_this){
	return (bool *)(&(c_this->targetReplan));
}

float * nav_dtCrowdAgent_GetPtrToTargetReplanTime(dtCrowdAgent * c_this){
	return (float *)(&(c_this->targetReplanTime));
}

unsigned char * nav_dtCrowdAgent_GetPtrToTargetState(dtCrowdAgent * c_this){
	return (unsigned char *)(&(c_this->targetState));
}

float * nav_dtCrowdAgent_GetPtrToTopologyOptTime(dtCrowdAgent * c_this){
	return (float *)(&(c_this->topologyOptTime));
}

float(*nav_dtCrowdAgent_GetPtrToVel(dtCrowdAgent * c_this))[3]{
	return (float(*)[3])(&(c_this->vel));
}

dtCrowdAgent * nav_dtCrowdAgent_IndexArray(dtCrowdAgent * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtCrowdAgentAnimation_Delete(dtCrowdAgentAnimation * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtCrowdAgentAnimation_DeleteArray(dtCrowdAgentAnimation * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtCrowdAgentAnimation * nav_NewdtCrowdAgentAnimation(){
	dtCrowdAgentAnimation* wrap_out = new dtCrowdAgentAnimation();
	return wrap_out;
}

bool * nav_dtCrowdAgentAnimation_GetPtrToActive(dtCrowdAgentAnimation * c_this){
	return (bool *)(&(c_this->active));
}

float(*nav_dtCrowdAgentAnimation_GetPtrToEndPos(dtCrowdAgentAnimation * c_this))[3]{
	return (float(*)[3])(&(c_this->endPos));
}

float(*nav_dtCrowdAgentAnimation_GetPtrToInitPos(dtCrowdAgentAnimation * c_this))[3]{
	return (float(*)[3])(&(c_this->initPos));
}

dtPolyRef * nav_dtCrowdAgentAnimation_GetPtrToPolyRef(dtCrowdAgentAnimation * c_this){
	return (dtPolyRef *)(&(c_this->polyRef));
}

float(*nav_dtCrowdAgentAnimation_GetPtrToStartPos(dtCrowdAgentAnimation * c_this))[3]{
	return (float(*)[3])(&(c_this->startPos));
}

float * nav_dtCrowdAgentAnimation_GetPtrToT(dtCrowdAgentAnimation * c_this){
	return (float *)(&(c_this->t));
}

float * nav_dtCrowdAgentAnimation_GetPtrToTmax(dtCrowdAgentAnimation * c_this){
	return (float *)(&(c_this->tmax));
}

dtCrowdAgentAnimation * nav_dtCrowdAgentAnimation_IndexArray(dtCrowdAgentAnimation * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtCrowdAgentDebugInfo_Delete(dtCrowdAgentDebugInfo * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtCrowdAgentDebugInfo_DeleteArray(dtCrowdAgentDebugInfo * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtCrowdAgentDebugInfo * nav_NewdtCrowdAgentDebugInfo(){
	dtCrowdAgentDebugInfo* wrap_out = new dtCrowdAgentDebugInfo();
	return wrap_out;
}

int * nav_dtCrowdAgentDebugInfo_GetPtrToIdx(dtCrowdAgentDebugInfo * c_this){
	return (int *)(&(c_this->idx));
}

float(*nav_dtCrowdAgentDebugInfo_GetPtrToOptEnd(dtCrowdAgentDebugInfo * c_this))[3]{
	return (float(*)[3])(&(c_this->optEnd));
}

float(*nav_dtCrowdAgentDebugInfo_GetPtrToOptStart(dtCrowdAgentDebugInfo * c_this))[3]{
	return (float(*)[3])(&(c_this->optStart));
}

dtObstacleAvoidanceDebugData * * nav_dtCrowdAgentDebugInfo_GetPtrToVod(dtCrowdAgentDebugInfo * c_this){
	return (dtObstacleAvoidanceDebugData * *)(&(c_this->vod));
}

dtCrowdAgentDebugInfo * nav_dtCrowdAgentDebugInfo_IndexArray(dtCrowdAgentDebugInfo * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtCrowdAgentParams_Delete(dtCrowdAgentParams * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtCrowdAgentParams_DeleteArray(dtCrowdAgentParams * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtCrowdAgentParams * nav_NewdtCrowdAgentParams(){
	dtCrowdAgentParams* wrap_out = new dtCrowdAgentParams();
	return wrap_out;
}

float * nav_dtCrowdAgentParams_GetPtrToCollisionQueryRange(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->collisionQueryRange));
}

float * nav_dtCrowdAgentParams_GetPtrToHeight(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->height));
}

float * nav_dtCrowdAgentParams_GetPtrToMaxAcceleration(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->maxAcceleration));
}

float * nav_dtCrowdAgentParams_GetPtrToMaxSpeed(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->maxSpeed));
}

unsigned char * nav_dtCrowdAgentParams_GetPtrToObstacleAvoidanceType(dtCrowdAgentParams * c_this){
	return (unsigned char *)(&(c_this->obstacleAvoidanceType));
}

float * nav_dtCrowdAgentParams_GetPtrToPathOptimizationRange(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->pathOptimizationRange));
}

unsigned char * nav_dtCrowdAgentParams_GetPtrToQueryFilterType(dtCrowdAgentParams * c_this){
	return (unsigned char *)(&(c_this->queryFilterType));
}

float * nav_dtCrowdAgentParams_GetPtrToRadius(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->radius));
}

float * nav_dtCrowdAgentParams_GetPtrToSeparationWeight(dtCrowdAgentParams * c_this){
	return (float *)(&(c_this->separationWeight));
}

unsigned char * nav_dtCrowdAgentParams_GetPtrToUpdateFlags(dtCrowdAgentParams * c_this){
	return (unsigned char *)(&(c_this->updateFlags));
}

void * * nav_dtCrowdAgentParams_GetPtrToUserData(dtCrowdAgentParams * c_this){
	return (void * *)(&(c_this->userData));
}

dtCrowdAgentParams * nav_dtCrowdAgentParams_IndexArray(dtCrowdAgentParams * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtCrowdNeighbour_Delete(dtCrowdNeighbour * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtCrowdNeighbour_DeleteArray(dtCrowdNeighbour * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtCrowdNeighbour * nav_NewdtCrowdNeighbour(){
	dtCrowdNeighbour* wrap_out = new dtCrowdNeighbour();
	return wrap_out;
}

float * nav_dtCrowdNeighbour_GetPtrToDist(dtCrowdNeighbour * c_this){
	return (float *)(&(c_this->dist));
}

int * nav_dtCrowdNeighbour_GetPtrToIdx(dtCrowdNeighbour * c_this){
	return (int *)(&(c_this->idx));
}

dtCrowdNeighbour * nav_dtCrowdNeighbour_IndexArray(dtCrowdNeighbour * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

dtCrowd * nav_dtAllocCrowd(){
	dtCrowd * c_out = dtAllocCrowd();
	dtCrowd * wrap_out  = (dtCrowd *)(void*)(c_out);
	return wrap_out;
}

void nav_dtFreeCrowd(dtCrowd * ptr){
	dtCrowd * c_arg_ptr=(dtCrowd *)(void*)(ptr);
	dtFreeCrowd(c_arg_ptr);
}

dtCrowdAgentAnimation * nav_NewDtCrowdAgentAnimationPtrArray(long n){
	dtCrowdAgentAnimation* c_this=new dtCrowdAgentAnimation[n];
	return c_this;
}

dtCrowdAgentDebugInfo * nav_NewDtCrowdAgentDebugInfoPtrArray(long n){
	dtCrowdAgentDebugInfo* c_this=new dtCrowdAgentDebugInfo[n];
	return c_this;
}

dtCrowdAgentParams * nav_NewDtCrowdAgentParamsPtrArray(long n){
	dtCrowdAgentParams* c_this=new dtCrowdAgentParams[n];
	return c_this;
}

dtCrowdAgent * nav_NewDtCrowdAgentPtrArray(long n){
	dtCrowdAgent* c_this=new dtCrowdAgent[n];
	return c_this;
}

dtCrowdNeighbour * nav_NewDtCrowdNeighbourPtrArray(long n){
	dtCrowdNeighbour* c_this=new dtCrowdNeighbour[n];
	return c_this;
}

dtCrowd * nav_NewDtCrowdPtrArray(long n){
	dtCrowd* c_this=new dtCrowd[n];
	return c_this;
}

#ifdef __cplusplus
}
#endif
